import time

# a = 15
# b = 12345678.1234567
# s = 'I love Python!'
# print('a = %05d' % a)
# print('b = %8.3f' % b)
# print(len(s))
# print('%17s' % s)
# print('%-17.6s' % s)

# scale = 10
# print('----------执行开始---------')
# for i in range(scale + 1):
#     done = '**' * i
#     undone = '..' * (scale - i)
#     percent = i / scale
#     print('{:>4.0%} [{}->{}]'.format(percent, done, undone))
#     time.sleep(0.5)

# excerpts = "qwertyuiopasdfghjklzxcvbnm"
# c = input('输入字母')
# index = excerpts.find(c)
# if index > -1:
#     print('{}首次出现的位置索引为：{}'.format(c,index))
#     print('{}在此片段中出现{}次'.format(c,excerpts.count(c)))
# else:
#     print('{}没有出现在此片段中'.format(c))

# strs = 'This is an example of cutting'
# # print(strs.split())
# print(strs.split(' ',3))

# strs = 'Rain falls    on   field   and    tree.'
# print(strs)
# split_strs = strs.split()
# print(split_strs)
# join_strs = ' '.join(split_strs)
# print(join_strs)

# strs = 'Monday Tuesday Wednesday'
# print(strs.replace('day','DAY',2))

# strs = '110This is an example0001'
# print(strs.strip('01'))

checkStr = input('请输入要判断的字符串：\n')
flag = True
low = 0
high = len(checkStr) - 1
while low < high:
    if checkStr[low] != checkStr[high]:
        flag = False
        break
    low += 1
    high -=1
if flag:
    print('“{}” 是回文串。'.format(checkStr))
else:
    print('“{}"不是回文串。'.format(checkStr))